//
//  RefreshReward.m
//  CarCare
//
//  Created by ileo on 15/4/30.
//  Copyright (c) 2015年 baozun. All rights reserved.
//

#import "RefreshReward.h"
#import "NetHome.h"

@implementation RefreshReward

IMP_SINGLETON

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.timeInterval = 60;
        __weak __typeof(self) wself = self;
        self.Refresh = ^(){
            [[NetHome rewardNew] requestSuccess:^(id JSON) {
                wself.newReward = [JSON[@"count"] integerValue];
                if (wself.RefreshCallBack) {
                    wself.RefreshCallBack(JSON);
                }
            }];
        };
    }
    return self;
}

@end
